package com.group.integration.common.exception;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @author xiaoma
 */

@Getter
@AllArgsConstructor
public enum ExceptionEnum {

    // 数据操作错误定义
    SUCCESS(200, "success!"),
    BODY_NOT_MATCH(400, "请求的数据格式不符!"),
    SIGNATURE_NOT_MATCH(401, "请求的数字签名不匹配!"),
    NOT_FOUND(404, "未找到该资源!"),
    INTERNAL_SERVER_ERROR(500, "system failure!"),
    SERVER_BUSY(503, "服务器正忙，请稍后再试!"),
    REQUEST_BODY_IS_NULL(2000, "用户姓名不能为空！"),
    REPEAT_SUBMIT(2001, "重复请求！"),

    ;

    /**
     * 异常码
     */
    private final Integer errorCode;

    /**
     * 异常描述
     */
    private final String errorMessage;

}
